<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bai 2.3</title>
</head>

<body>
<?php
	define("PI",3.14);
	if(isset($_POST["bankinh"]))
	{
		$bankinh=	$_POST["bankinh"];
		$dientich=PI*pow($bankinh,2);
		$chuvi=2*PI*$bankinh;
	}
?>
<form id="form1" name="form1" method="post" action="Bai2_3.php">
  <table width="350" align="center" cellpadding="1" cellspacing="0">
    <tr bgcolor="#FF9900">
      <td colspan="2" style="text-align: center; font-stretch:extra-expanded; font-family: 'Lucida Console', Monaco, monospace; color: #930; font-weight: bold;">DIỆN TÍCH và CHU VI<br /> HÌNH TRÒN</td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Bán kính:</td>
      <td bgcolor="#FF9966"><input name="bankinh" type="text" id="bankinh" value="<?php echo $bankinh; ?>" /></td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Diện tích::</td>
      <td bgcolor="#FF9966"><input name="dientich" type="text" id="dientich" style="background-color:#F9C;" value="<?php echo $dientich; ?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <td bgcolor="#FF9966">Chu vi::</td>
      <td bgcolor="#FF9966"><input name="chuvi" type="text" id="chuvi" style="background-color:#F9C;" value="<?php echo $chuvi; ?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <td colspan="2" bgcolor="#FF9966" style="text-align: center"><input type="submit" name="submit" id="submit" value="Tính" /></td>
    </tr>
  </table>
</form>
</body>
</html>